Skip to content

Add WebAssembly support.#27

Open
dmitshur wants to merge 2 commits intomainfrom
wasm
Open

Add WebAssembly support.#27
dmitshur wants to merge 2 commits intomainfrom
wasm

Conversation

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Nov 4, 2018

This change is a work in progress on adding support for WebAssembly to package gl, while maintaining GopherJS support.

It's done by differentiating code for WebAssembly (which uses syscall/js API) from existing code for GopherJS (which uses github.com/gopherjs/gopherjs/js API) with the following build constraints:

_js.go

// +build js,!wasm

... GopherJS code ...

_wasm.go

// +build js,wasm

... WebAssembly code ...

It has been developed and tested primarily with the Hover and eX0-go projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant